-- GENERATED SPELL FOR [Shadow Priestess Shai] --


function spell0_15615(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(17138,pUnit)
pUnit:RegisterEvent('Sorts_15615', 1500, 1)
end

function spell1_15615(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(17194,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15615', 1500, 1)
end

function spell2_15615(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(17146,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15615', 18000, 1)
end

function Sorts_15615(pUnit, Event)
local choix_sorts_15615 = math.random(0, 2)
if choix_sorts_15615 == 0 then
pUnit:RegisterEvent('spell0_15615', 1, 1)
end
if choix_sorts_15615 == 1 then
pUnit:RegisterEvent('spell1_15615', 1, 1)
end
if choix_sorts_15615 == 2 then
pUnit:RegisterEvent('spell2_15615', 1, 1)
end
end

function mob15615_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15615', math.random(1500, 3000), 1)
end

function mob15615_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15615_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15615_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15615, 1, 'mob15615_Action')
RegisterUnitEvent(15615, 2, 'mob15615_Leave')
RegisterUnitEvent(15615, 3, 'mob15615_Kill')
RegisterUnitEvent(15615, 4, 'mob15615_Die')
